//引入axios请求文件
import request from "./http";

// 发送验证码 /captcha/sent

export function getCaptchaSent(params) {
    return request({
        url: '/captcha/sent',
        method: 'get',
        params
    })
} 

//验证码验证 /captcha/verify

export function getCaptchaVerify(params) {
    return request({
        url: '/captcha/verify',
        method: 'get',
        params
    })
} 

//验证手机号是否注册过 /cellphone/existence/check  必选参数phone : 手机号码
export function getCellphoneExist(params) {
    return request({
        url: '/cellphone/existence/check',
        method: 'get',
        params
    })
} 

// 1. 手机登录 /login/cellphone
export function getLoginCellphone(params) {
    return request({
        url: '/login/cellphone',
        method: 'get',
        params
    })
} 

//2. 注册或修改密码 /register/cellphone 
//参数captcha: 验证码 ,phone : 手机号码,password: 密码,nickname: 昵称
export function getRegisterCellphone(params) {
    return request({
        url: '/register/cellphone',
        method: 'get',
        params
    })
} 